<?php

// No direct access
 
defined('_JEXEC') or die('Restricted access'); 

if($this->c_lang == 'eu-ES'){
	print("<h1>".$this->rsc->info_title.$this->lang->name_eu."</h1>");
}
else
	print("<h1>".$this->rsc->info_title.$this->lang->name_es."</h1>");
?>
<br/>
<br/>
<i><?php echo $this->rsc->qa_edit_text; ?></i>
<br/>
<br/>
<br/>
<p align="right"><a href="index.php?option=com_hizkuntzak&task=qas">&laquo; <?php print($this->rsc->volver)?></a></p>
<br/>
<form name="editQasLang" method="post" enctype="multipart/form-data" action="index.php?option=com_hizkuntzak">
<input type="hidden" name="task" value="addQasLang"/>
<input type="hidden" name="hlang" value="<?php echo($this->lang->iso_code); ?>" />
<?php 
	foreach($this->qasLang as $qa){
?>
	<h3><?php echo($qa->qa->id." º ".$this->rsc->menu_qa);?></h3>
	<i>
	<?php 
		if($qa->active)
			echo($this->rsc->word_active.": <input type='checkbox' name='qa".$qa->qa->id."-a' checked='checked'/>");
		else
			echo($this->rsc->word_active.": <input type='checkbox' name='qa".$qa->qa->id."-a' />");
		
	?>
	</i>
	<table >
		<tr>
			<th></th>
			<th><?php echo($this->rsc->word_spelling);?></th>
			<th><?php echo($this->rsc->word_pronoun);?></th>
			<th><?php echo($this->rsc->word_video);?></th>
		</tr>
<?php 
		echo("<tr>");
		if($this->c_lang == 'eu-ES'){
			echo("<td><strong><i>".$qa->qa->q_eu."</i></strong></td>");
		}
		else{
			echo("<td><strong><i>".$qa->qa->q_es."</i></strong></td>");
		}
		echo("<td><input name='q".$qa->qa->id."-s' value='$qa->q_spelling'/></td>");
		echo("<td><input name='q".$qa->qa->id."-p' value='$qa->q_pronoun'/></td>");
		echo("<td><input type='file' name='q".$qa->qa->id."-v' value='$qa->q_videoPath'/>");
		if($qa->q_videoPath != "" || $qa->q_videoPath != null){
			echo("<i>".$this->rsc->video_already."</i>");
		}
		echo("<input type='hidden' name='q".$qa->qa->id."-vo' value='$qa->q_videoPath'/></td>");
		echo("</tr>");
		echo("<tr>");
		if($this->c_lang == 'eu-ES'){
			echo("<td><strong><i>".$qa->qa->a_eu."</i></strong></td>");
		}
		else{
			echo("<td><strong><i>".$qa->qa->a_es."</i></strong></td>");
		}
		echo("<td><input name='a".$qa->qa->id."-s' value='$qa->a_spelling'/></td>");
		echo("<td><input name='a".$qa->qa->id."-p' value='$qa->a_pronoun'/></td>");
		echo("<td><input type='file' name='a".$qa->qa->id."-v' value='$qa->a_videoPath'/>");
		if($qa->a_videoPath != "" || $qa->a_videoPath != null){
			echo("<i>".$this->rsc->video_already."</i>");
		}
		echo("<input type='hidden' name='a".$qa->qa->id."-vo' value='$qa->a_videoPath'/></td>");
		echo("</tr>");
?>
	</table>
<?php 		
	}
?>

<br/>
<br/>
<p align="right"><a href="index.php?option=com_hizkuntzak&task=qas">&laquo; <?php print($this->rsc->volver)?></a></p>
<br/>
<input type="submit" value="<?php echo $this->rsc->save_changes; ?>" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false">
</form>
